import { defineFakeRoute } from 'vite-plugin-fake-server/client';
import { get, post } from '../BaseMock';

const postListReturn = () => {
  return {
    total: 4,
    rows: [
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:27:12',
        updateBy: null,
        updateTime: null,
        remark: '',
        postId: 1,
        postCode: 'ceo',
        postName: '董事长',
        postSort: 1,
        status: '0',
        flag: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:27:12',
        updateBy: null,
        updateTime: null,
        remark: '',
        postId: 2,
        postCode: 'se',
        postName: '项目经理',
        postSort: 2,
        status: '0',
        flag: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:27:12',
        updateBy: null,
        updateTime: null,
        remark: '',
        postId: 3,
        postCode: 'hr',
        postName: '人力资源',
        postSort: 3,
        status: '0',
        flag: false
      },
      {
        createBy: 'admin',
        createTime: '2024-06-30 11:27:12',
        updateBy: null,
        updateTime: null,
        remark: '',
        postId: 4,
        postCode: 'user',
        postName: '普通员工',
        postSort: 4,
        status: '0',
        flag: false
      }
    ],
    code: 200,
    msg: '查询成功'
  };
};
export default defineFakeRoute([get('/system/post/list', postListReturn)]);
